/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.corespring.restaurant.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.corespring.restaurant.dao.MenuDao;
import org.corespring.restaurant.dao.PlatoMenuDao;
import org.corespring.restaurant.model.Menu;
import org.corespring.restaurant.model.Platomenu;
import org.corespring.restaurant.service.MenuManager;

/**
 *
 * @author Aldo
 */
@Service
public class MenuManagerImpl implements MenuManager {

    @Autowired
    MenuDao menuDao;
    @Autowired
    PlatoMenuDao platomenuDao;

    @Override
    public List<Menu> obtenerListaMenus() {
        return menuDao.obtenerListaMenus();
    }

    @Override
    public Menu obtenerMenuById(String idMenu) {
        return menuDao.obtenerMenuById(idMenu);
    }

    @Override
    public void guardarMenu(Menu menu) {
        menuDao.guardarMenu(menu);
    }

    @Override
    public void actualizarMenu(Menu menu) {
        menuDao.actualizarMenu(menu);
    }

    @Override
    public void eliminarMenu(String idMenu) {
        menuDao.eliminarMenu(idMenu);
    }
    
    public void guardarPlatoMenu(Platomenu pm) {
        platomenuDao.guardarPlatoMenu(pm);
    }

}